home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
MNetsrc.hqx
/
Mac TCP_IP Source v.33
/
mac_fopenw.h
< prev
next >
Wrap
Text File
|
1989-02-16
|
4KB
|
143 lines
/* (C) Copyright 1986. THINK Technologies, Inc. All rights reserved. */
/*
This is the header file for the windowed output printf-2-w.c
supplied with the new stdio.
*/
#ifndef _fopenwh_
#define _fopenwh_
#ifndef _stdioh_
#include "stdio.h"
#endif
#ifndef _WindowMgr_
#include "WindowMgr.h"
#endif
#ifndef _ControlMgr_
#include "ControlMgr.h"
#endif
#ifndef _EventMgr_
#include "EventMgr.h"
#endif
#ifndef _MenuMgr_
#include "MenuMgr.h"
#endif
/* This is the Standard Window Options structure (passed in to fopenw) */
/* Defaults are as follows (check printf-2-w.c for details) if you don't
pass in an options record to fopenw() (also Console window):
maxrow and maxcol are determined by screenbits.Bounds and the current
font, so they will be something like 24 x 80 with Monaco 9 font on a
standard Mac screen, larger on a Mac XL (Lisa), and even larger on
something like a Radius.
cursor_visible true
echo_state true
_tab_width 4
no_pull_front false
no_grow, false
no_drag, false
no_goaway, false
no_scroll, false
no_wrap; false
*/
typedef struct
{
int maxrow, /* number of rows in screen array */
maxcol; /* number of columns in screen array */
Boolean cursor_visible, /* cursor is visible */
echo_state, /* true if echo enabled */
_tab_width, /* width of tabs */
no_pull_front, /* don't pull window to front on keystrokes */
no_grow, /* no grow box */
no_drag, /* not draggable */
no_goaway, /* no goaway box */
no_scroll, /* vertical wrap instead of scrolling */
no_wrap; /* fall off end of line rather than horizontal wrap */
} StdWindowOptions;
typedef struct
{
WindowRecord wrec; /* actual window record -- a pointer to this
can be obtained by Get_WindowPtr(filevar)
where filevar is returned from fopenw() */
long signature; /* can be used to determine if stdio window */
StdWindowOptions opt; /* our options record */
int visrow, /* # visible rows */
viscol, /* # visible columns */
row, /* current row */
col, /* current column */
toprow, /* row in array that is actual first row
since scrolling only changes this and
treats screen array as a wrapped queue */
charheight, /* character height in pixels */
charwidth; /* character width in pixels */
FontInfo sf; /* stuff for font management */
char screen[]; /* screen row buffer -- pointer to this can
be obtained with Get_ScreenPtr(filevar)
where filevar is returned from fopenw()*/
} StdWindowRec;
typedef struct { /* expandable window refcon control structure */
int (*eventProc)();
ControlHandle vscroll;
} eventinfo;
typedef struct {
EventRecord record;
WindowPtr window;
ControlHandle control;
} XEventRecord;
typedef struct {
WindowPtr wp;
FILE *fp;
} StdwsaveRecord;
enum {OFF, ON};
/* misc. defs */
#define _OURSIGNATURE 'LSWD' /* identifies our window records */
#define _CONTROLWIDTH 15 /* width of scroll bar */
#define _LEFTEDGE 4 /* margins */
#define _TOPEDGE 4
#define _MBARHEIGHT (ROM85==-1?20:MBarHeight)
#define _TITLEBARHEIGHT 20
/*#define hiword(x) (((short *) &(x))[0])
#define loword(x) (((short *) &(x))[1])*/
#define screenHeight (screenBits.bounds.bottom)
#define screenWidth (screenBits.bounds.right)
typedef enum
{
menuEvent=16, /* our internal codes for events */
growEvent,
dragEvent,
cursorEvent,
selectEvent,
controlEvent,
deactivateEvt,
closeEvent,
openEvent,
appleEvent,
dialogEvent,
editEvent
};
#endif